
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>审核</title>

<style>
@charset "utf-8";
/*------------// Overall //------------------*/
body{font:12px/180% Arial,Helvetica,Verdana;color:#5a5a5a; margin:0; background:#FFF;}
body.login{ background:url(/images/login_bgx.gif);}
table,td{font:12px/180% Arial, "宋体",Helvetica, sans-serif,Verdana; color:#58595b;}
table{border-collapse:collapse; border-spacing:0; empty-cells:show; }
th, td { border-collapse:collapse; }
A:link{text-decoration:none; color:#58595b;}
A:visited{text-decoration:none; color:#58595b;}
A:hover{text-decoration:none; color:#206fd5;}
img{ border:0; }
div,p,img,ul,li,form,input,label,span,dl,dt,dd,h1,h2,h3,h4,h5,h6{margin:0;padding:0;}
input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner{   border:none;padding:0 }
ol,ul,li{list-style-type:none;}
.overz{ overflow:auto; zoom:1; overflow-x:hidden; overflow-y:hidden;}
.dspn{ display:none;}
a{blr:expression(this.onFocus=this.blur())} /*for IE*/
a{outline:none;} /*for Firefox*/
html{-webkit-text-size-adjust:none;}

/*--login--*/
.login_m{ width:403px; margin:0 auto; height:375px; margin-top:98px; /*position: absolute;left:50%;top:50%;margin-left:-202px;margin-top:-188px;*/}
.login_logo{ text-align:center; margin-bottom:25px;}
.login_boder{ background: url(/images/login_m_bg.png) no-repeat; height:302px; overflow:hidden;}
.login_padding{ padding:28px 47px 20px 47px ;}
.login_boder h2{ color:#4f5d80; text-transform:uppercase; font-size:12px; font-weight:normal; margin-bottom:11px;}
.forget_model_h2{color:#4f5d80; font-size:12px; font-weight:normal; margin-bottom:11px;}

.login_boder input.txt_input{ width:295px; height:36px; border:1px solid #cad2db; padding:0 5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; line-height:36px; margin-bottom:10px; font-size:14px; color:#717171; font-family:Arial;}
.login_boder input.txt_input2{ margin-bottom:20px;}
.login_boder input.txt_input:focus{ transition:border linear .2s,box-shadow linear .2s; -moz-transition:border linear .2s,-moz-box-shadow linear .2s; -webkit-transition:border linear .2s,-webkit-box-shadow linear .2s; outline:none;border-color:rgba(173,173,173.75); box-shadow:0 0 8px rgba(173,173,173,.5); -moz-box-shadow:0 0 8px rgba(173,173,173,.5); -webkit-box-shadow:0 0 8px rgba(173,173,173,3); border:1px solid #6192c8;}
.login_boder p.forgot{ font-size:11px;  text-align:right; margin-bottom:15px;}
.login_boder p.forgot a,.login_boder p.forgot a:visited{color:#8c8e91;}
.login_boder p.forgot a:hover{color:#206fd5;}
.rem_sub input.sub_button{ float:right; width:122px; height:32px;border:none; color:#FFF; padding-bottom:2px; font-size:14px; font-weight:bold;display: inline-block;padding: 6px 12px;margin-bottom: 0;font-size: 14px;font-weight: 400;line-height: 1.42857143;text-align: center;white-space: nowrap;vertical-align: middle;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;background-image: none;border: 1px solid transparent;border-radius: 4px;color: #fff;background-color: #59b0ff;}

.rem_sub input.sub_buttons{ float:left; width:122px;height:32px; border:none; color:#FFF; padding-bottom:2px; font-size:14px; font-weight:bold;}
.rem_sub input.sub_buttons:hover{ background-position:-153px -882px; cursor:pointer;}

.rem_sub input.sub_button:hover{ background-position:-153px -882px; cursor:pointer;}
.rem_sub .rem_sub_l{ float:left; font-size:12px; height:33px; line-height:33px;}
.rem_sub input#checkbox{ margin-right:5px; vertical-align:middle;}
.error_info{color: red; padding-left: 47px; margin-bottom: -25px; margin-top: 15px; height: 20px;}
</style>

</head>

<body class="login">

<div class="login_m">
    <div class="login_logo"><img src="" width="196" height="46" style="display: none;"><h2>融云 - 审核</h2></div>
    <div class="login_boder">
        <div class="error_info"></div>
        <div class="login_padding">
            <h2>用户名</h2>
            <label>
                <input type="text" id="username" class="txt_input txt_input2" onfocus="if (value ==&#39;Your name&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;Your name&#39;}" value="Your name">
            </label>
            <h2>密码</h2>
            <label>
                <input type="password" name="password" id="userpwd" class="txt_input" onfocus="if (value ==&#39;******&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;******&#39;}" value="******">
            </label>
            <p class="forgot"><a href="javascript:void(0);">忘记密码?</a></p>
            <div class="rem_sub">
                <!-- <div class="rem_sub_l">
                    <input type="checkbox" name="checkbox" id="save_me">
                    <label for="checkbox">记住</label>
                </div> -->
                <label>
                    <input type="button" class="sub_button" name="button" id="button" value="登录">
                </label>
            </div>
        </div>
    </div><!--login_boder end-->
</div><!--login_m end-->

<br />
<br />

<p align="center"> More  <a href="" target="_blank" title="">XXX</a> - Collect from <a href="" title="" target="_blank">XXXXX</a></p>

</body>
</html>
<script src="/js/jQuery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        $.popup=function(message){
            $(".error_info").text(message);
            setTimeout(function() {
                $(".error_info").text('');
            }, 3000);
        }
        $("#button").on('click', function(event) {
            var username = $("#username").val();
            var passwd = $("#userpwd").val();
            if(username.length==0){
                $.popup("请输入用户名");
                return false;
            }
            if(passwd.length==0){
                $.popup("请输入密码");
                return false;
            }
            regname=/^[A-Za-z0-9_]{5,18}$/;
            regpwd=/^[A-Za-z0-9!@#%&*]{6,18}$/;
            if(!regname.test(username)){
                $.popup("用户名格式不正确，请重新输入");
                $("#username").val("");
                return false;
            }
            if(!regpwd.test(passwd)){
                $.popup("密码格式不正确，请重新输入");
                $("#password").val("");
                return false;
            }

            $.ajax({
                url: "{{ url('user/login') }}",
                type: 'post',
                dataType: 'json',
                data: {
                    'username': username,
                    'pwd': passwd
                },
                success: function(data){
                    if(data.code == 200){
                        window.location.href = "{{ url('index') }}";
                    }
                },
                error: function(data) {
                    if (data.code == '10403') {
                        $.popup('账户名密码错误~！');
                    } else {
                        $.popup('登录异常');
                    }
                }
            });
        });
    });
</script>